import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        arr=quicksort(arr,0,n-1);
        for (int i = 0; i < n; i++) {
            System.out.print(arr[i]+" ");
        }
    }

    private static int[] quicksort(int[] arr, int left, int right) {
        if(left<right) {
            int p=patition(arr,left,right);
            quicksort(arr,left,p-1);
            quicksort(arr,p+1,right);
        }
        return arr;

    }

    private static int patition(int[] arr, int left, int right) {
        int p=left;
        int index=p+1;
        for (int i = index; i <=right; i++) {
            if(arr[i]<arr[p]) {
                swap(arr,i,index);
                index++;
            }
        }
        swap(arr,p,index-1);
        return index-1;
    }

    private static void swap(int[] arr, int left, int right) {
        int t=arr[left];
        arr[left]=arr[right];
        arr[right]=t;
    }
}
